*: Deterministic error work in preparation for gas#2112
Conversation
3300588 to
ce5b648
Compare
leoyvens
left a comment
There was a problem hiding this comment.
Very happy to see this lift done!
| // initially at the start of the content skipping `length`. | ||
| let mut offset = size_of::<u32>(); | ||
|
|
||
| // TODO: Verify that the length specified matches the byte length |
There was a problem hiding this comment.
What's the situation with this TODO?
There was a problem hiding this comment.
The code as it was before (and as it is now) does not verify that the value of the first 4 bytes specifying the string length coincides with the length of asc_obj.
| link_ptr: AscPtr<AscString>, | ||
| ) -> Result<AscPtr<Uint8Array>, HostExportError> { | ||
| if !self.experimental_features.allow_non_deterministic_ipfs { | ||
| return Err(HostExportError::Deterministic(anyhow!( |
There was a problem hiding this comment.
I wouldn't consider this deterministic because it depends on an env var set by the indexer.
There was a problem hiding this comment.
I spent a while waffling about how to handle this. We've used the word "determinism" to actually mean multiple conflated things in different contexts. In this case, the error is in fact attestable. Within the context of The Network this subgraph should always fail with this error, deterministically. I'd be interested in a longer chat on slack about whether or not we should tease these apart somehow or what.
There was a problem hiding this comment.
I see your point that in the network the this should never be allowed so it is deterministic. Ok we can keep this as deterministic.
ce5b648 to
bde462b
Compare
bde462b to
729137b
Compare
|
I think that the issue that I am facing is related to this issue, I am running in local the ens-subgraph when reaching to the first block to index I have the error doing some research on it I see that it comes for this implementation here https://github.com/graphprotocol/graph-node/blob/master/runtime/wasm/src/module/mod.rs#L1576 then my question is, how it is possible to set the |
|
UPDATE, I found the undocumented env variable for set the experimental feature |
Error Determinism
Non-Panicky Errors
There's probably a lot more that can be done along these lines...